check_bad_nested_interruption(isr, regs, vector);
PSCB(v, unat) = regs->ar_unat; // not sure if this is really needed?
PSCB(v, precover_ifs) = regs->cr_ifs;
- PSCB(v, ipsr) = vcpu_get_ipsr_int_state(v, regs->cr_ipsr);
+ PSCB(v, ipsr) = vcpu_get_psr(v);
vcpu_bsw0(v);
PSCB(v, isr) = isr;
PSCB(v, iip) = regs->cr_iip;
regs->cr_ipsr, regs->cr_iip, isr, PSCB(v, iip));
PSCB(v, unat) = regs->ar_unat; // not sure if this is really needed?
PSCB(v, precover_ifs) = regs->cr_ifs;
- PSCB(v, ipsr) = vcpu_get_ipsr_int_state(v, regs->cr_ipsr);
+ PSCB(v, ipsr) = vcpu_get_psr(v);
vcpu_bsw0(v);
PSCB(v, isr) = isr;
PSCB(v, iip) = regs->cr_iip;
/* Fool cpl. */
if (ipsr.ia64_psr.cpl < 3)
newpsr.ia64_psr.cpl = 0;
+ else
+ newpsr.ia64_psr.cpl = 3;
newpsr.ia64_psr.bn = PSCB(vcpu, banknum);
return IA64_NO_FAULT;
}
-u64 vcpu_get_ipsr_int_state(VCPU * vcpu, u64 prevpsr)
-{
- u64 dcr = PSCB(vcpu, dcr);
- PSR psr;
-
- //printk("*** vcpu_get_ipsr_int_state (0x%016lx)...\n",prevpsr);
- psr.i64 = prevpsr;
- psr.ia64_psr.pp = 0;
- if (dcr & IA64_DCR_PP)
- psr.ia64_psr.pp = 1;
- psr.ia64_psr.ic = PSCB(vcpu, interrupt_collection_enabled);
- psr.ia64_psr.i = !vcpu->vcpu_info->evtchn_upcall_mask;
- psr.ia64_psr.bn = PSCB(vcpu, banknum);
- psr.ia64_psr.dfh = PSCB(vcpu, vpsr_dfh);
- psr.ia64_psr.dt = 1;
- psr.ia64_psr.it = 1;
- psr.ia64_psr.rt = 1;
- if (psr.ia64_psr.cpl == 2)
- psr.ia64_psr.cpl = 0; // !!!! fool domain
- // psr.pk = 1;
- //printk("returns 0x%016lx...\n",psr.i64);
- return psr.i64;
-}
-
BOOLEAN vcpu_get_psr_ic(VCPU * vcpu)
{
return !!PSCB(vcpu, interrupt_collection_enabled);
extern IA64FAULT vcpu_get_ar(VCPU * vcpu, u64 reg, u64 * val);
/* psr */
extern BOOLEAN vcpu_get_psr_ic(VCPU * vcpu);
-extern u64 vcpu_get_ipsr_int_state(VCPU * vcpu, u64 prevpsr);
extern u64 vcpu_get_psr(VCPU * vcpu);
extern IA64FAULT vcpu_get_psr_masked(VCPU * vcpu, u64 * pval);
extern IA64FAULT vcpu_reset_psr_sm(VCPU * vcpu, u64 imm);